package com.leo;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Separator;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.HBox;
import javafx.stage.Stage;

/**
 * @ClassName SeparatorDemo
 * @Description
 * @Author wangss
 * @date 2020.05.26 20:29
 * @Version 1.0
 */
public class SeparatorDemo extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        AnchorPane anchorPane = new AnchorPane();
        anchorPane.setStyle("-fx-background-color: #e7eeea");
        Scene scene = new Scene(anchorPane);

        HBox hBox = new HBox();

        Button button1 = new Button("button1");
        Button button2 = new Button("button2");

        Separator separator = new Separator();
        separator.setPrefHeight(100d);
        separator.setPrefWidth(100d);

        hBox.getChildren().addAll(button1, separator, button2);

        anchorPane.getChildren().add(hBox);

        primaryStage.setScene(scene);
        primaryStage.setTitle("spinner");
        primaryStage.setWidth(625d);
        primaryStage.setHeight(500d);
        primaryStage.setResizable(false);
        primaryStage.show();
    }
}
